package de.backtomedieval.units;

import de.backtomedieval.R;
import de.backtomedieval.game.Costs;
import de.backtomedieval.main.Game;
import de.backtomedieval.research.Technology;

public class TwoHandedSwordman extends AbstractUnit {
	//*******************************************
	private static final int _healthpoints = 150;
	private static final int _attackMultiple = 2;
	private static final int _attack = 25;
	private static final int _defense = 4;
	private static final int _attackquality = 60;
	private static final int[] _attackRounds = {6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
	private static Costs costSetting = null;
	private static final int _buildPoints = 100;	
	//*******************************************

	public TwoHandedSwordman(Technology technology) {
		super(_healthpoints, _attack, _defense, _attackquality, _attackMultiple, _attackRounds, _buildPoints);
		if (technology != null) this.setAttack(_attack + technology.getTwoHandedSwordmanAttackBonus());
		if (technology != null) this.setDefense(_defense + technology.getTwoHandedSwordmanDefenseBonus());
		if (costSetting == null){
			costSetting = new Costs();
			costSetting.setIronCost(100);
			costSetting.setGoldCost(30);
			}
		this.setCosts(costSetting);
	}


	
	@Override
	public String getName(int count) {
		if (count==1) return Game.getString(R.string.unit_twohandedswordman);
		return Game.getString(R.string.unit_twohandedswordman_pl);
	}
	
	@Override
	public Integer getImage() {
		return R.drawable.twohand;
	}
	
	@Override
	public int getBuildIn() {
		return AbstractUnit.BUILD_IN_BARRACKS;
	}



	public static int getBaseAttack() {
		return _attack;
	}
	
	public static int getBaseDefense() {
		return _defense;
	}
	
}
